<?php

namespace App\Models\Posts;

use Dcat\Admin\Traits\HasDateTimeFormatter;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Database\Eloquent\Model;

class WxPostsVote extends Model
{
	use HasDateTimeFormatter;
    use SoftDeletes;

    protected $fillable = ['post_id', 'option1', 'num1', 'option2', 'num2', 'option3', 'num3', 'option4', 'num4', 'option5', 'num5',
        'option6', 'num6', 'option7', 'num7', 'option8', 'num8', 'option9', 'num9', 'option10', 'num10',
        'option11', 'num11', 'option12', 'num12', 'option13', 'num13', 'option14', 'num14', 'option15', 'num15',
        'option16', 'num16', 'option17', 'num117', 'option18', 'num18', 'option19', 'num19', 'option20', 'num20'];

    protected $table = 'wx_posts_vote';

    public static function getPostId($vote_id){
        return self::where('id', $vote_id)->value('post_id');
    }

}
